NOT MERGE 478 qc plot on omega vs dndscv values comparison#479
NOT MERGE 478 qc plot on omega vs dndscv values comparison#479FerriolCalvet wants to merge 14 commits into
Conversation
…step was enabled in the pipeline
…omega-dndscv filtered table
|
@FerriolCalvet I fixed all errors, tests seeem to work fine 🥳 Should I add someone as reviewer before proceeding with the PR? |
|
new related tasks:
|
There was a problem hiding this comment.
Pull request overview
This PR extends the DeepCSA QC plotting workflow to add new omega comparison plots (omega vs dNdScv and omega vs omegaglobal) and wires dNdScv results into the plotting subworkflow, with corresponding output publishing updates.
Changes:
- Plumb dNdScv combined results (
all_dNdScv.cv.tsv) intoPLOTTING_QCand add an omega-vs-dNdScv QC plotting step (conditional onparams.dnds). - Add an omega-vs-omegaglobal QC plotting step and publish both new plot outputs under
qc/omegaqc/.... - Extend omega annotation QC outputs to emit a “flagged synonymous” debug TSV used for filtering/annotation in the new plots.
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| workflows/deepcsa.nf | Adds a dndscv_table channel and passes it into the QC plotting subworkflow when dNdScv runs. |
| subworkflows/local/plotting_qc/main.nf | Adds module includes and wiring for omega-vs-dNdScv and omega-vs-omegaglobal QC plots. |
| modules/local/plot/qc/omega_vs_omegaglobal/main.nf | New Nextflow process wrapper for running omega_vs_omegaglobal_qc.py. |
| modules/local/plot/qc/omega_vs_dndscv/main.nf | New Nextflow process wrapper for running omega_vs_dndscv_qc.py. |
| modules/local/plot/qc/annotate_omega/main.nf | Updates emitted debug outputs from omega QC annotation to expose flagged synonymous genes. |
| conf/results_outputs.config | Publishes new QC plot outputs to dedicated qc/omegaqc/... directories; updates omega flagged publish path. |
| bin/plot_explore_variability.py | Adds a comment (no functional change). |
| bin/omega_vs_omegaglobal_qc.py | New plotting script for omega vs omegaglobal comparison and correlation plots. |
| bin/omega_vs_dndscv_qc.py | New plotting script for omega vs dNdScv comparison and correlation plots. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path("*flagged_annotated.tsv") , emit: all_omegas_annotated | ||
| path("debug.*flagged*.tsv") , optional: true, emit: flagged_cases | ||
| path("debug.syn_flagged_gene.tsv") , optional: true, emit: flagged_synonymous_cases | ||
| path("*.tsv") , optional: true, emit: files | ||
| path("*.png") , optional: true, emit: plots | ||
| path "versions.yml" , topic: versions |
m-huertasp
left a comment
There was a problem hiding this comment.
Hola!!
I think it is a very nice job, Bet! I know it is fun when you start understanding a bit more how everything is connected.
I've added some comments, they have some questions in them just to understand what you want exactly. I've also tested the problem Copilot indicated and it is true. In fact, it might be the most important thing to tackle. But it should be quite simple.
If you need some help with something, tell me!
| sample_groups = flagged_genes_df['cohort'].unique().tolist() | ||
|
|
There was a problem hiding this comment.
I understand that the idea of this line is to get the name of the sample groups that you'll use later to generate the plot, right? Is the idea to plot only groups in which there is at least one flagged gene or you want to plot them all? Because by getting the groups from the flagged_genes_df you are getting only those with at least one flagged gene.
If you want to plot all, maybe you can get the groups from the omega_df or the dndscv_df??
| ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left') | ||
| ax.legend().remove() |
There was a problem hiding this comment.
From what I understand, a legend is generated by line 71 (because you set a hue and you don't add legend=False):
sns.scatterplot(data=impact_subset, x='dnds_omega', y='dnds_dndscv', hue='gene', ax=ax)
Then you try to reposition the legend to end up removing it.
If you don't want a legend, the best thing would be to add the legend=False at line 71, no?
It is not really important, just to know what you wanted 😄
| except Exception as e: | ||
| print("Error in the process", e) | ||
|
|
||
| # pca plot for mutdensity and mutdensity adjusted |
There was a problem hiding this comment.
Is there going to be a plot here??
Make this plot conditional (similar to the dNdScv plot) and emit an empty channel when not applicable. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.